import {generateMeta} from '../consts/component-meta';
import {DATASOURCE_TYPE, generateSelectionDict} from '../consts/datasource-types';
import {sequenceItemStrMap} from '@/common/consts/widget-config-sequence.map';
import _ from 'lodash';

export const customizeComponents = [

];
export const basicComponents = [
  {
    type: 'input',
    options: {
      isWidgetWidth: false,
      width: 100,
      defaultValue: '',
      defaultVariable: '',
      isVariableDefaultValue: false,
      required: false,
      requiredMessage: '',
      dataType: '',
      dataTypeCheck: false,
      dataTypeMessage: '',
      pattern: '',
      patternCheck: false,
      patternFlags: [],
      patternMessage: '',
      validatorCheck: false,
      validator: '',
      placeholder: '请输入',
      customClass: '',
      disabled: false,
      labelWidth: 100,
      isLabelWidth: false,
      hidden: false,
      showPassword: false
    },
    events: {
      onChange: '',
      onFocus: '',
      onBlur: ''
    },
    meta: generateMeta()
  },
  {
    type: 'textarea',
    options: {
      autosize: true,
      isWidgetWidth: false,
      width: 100,
      defaultValue: '',
      required: false,
      requiredMessage: '',
      rows: 3,
      disabled: false,
      pattern: '',
      patternCheck: false,
      patternFlags: [],
      patternMessage: '',
      validatorCheck: false,
      validator: '',
      placeholder: '请输入',
      customClass: '',
      labelWidth: 100,
      isLabelWidth: false,
      hidden: false
    },
    events: {
      onChange: '',
      onFocus: '',
      onBlur: ''
    },
    meta: generateMeta({
      column_format: 'TEXT', // 字段格式
      max_length: 2048 // 最大长度,
    })
  },
  {
    type: 'text',
    options: {
      customClass: '',
      hidden: false,
      contentPosition: 'left',
      fontSize: '14px',
      fontColor: '#3E464C',
      fontWeight: 'normal',
      fontFamily: 'inherit',
      fontStyle: 'normal',
      marginTop: 0,
      marginBottom: 0,
      text: '示例文字'
    },
    meta: false
  },
  {
    type: 'divider',
    options: {
      hidden: false,
      contentPosition: 'left',
      text: '分割线',
      paddingTop: 0,
      paddingBottom: 0
    }
  },
  {
    type: 'number',
    options: {
      isWidgetWidth: false,
      width: 100,
      required: false,
      requiredMessage: '',
      validatorCheck: false,
      validator: '',
      defaultValue: 0,
      min: 0,
      max: 9999999,
      step: 1,
      suffix: '', // 单位值
      showSuffix: false, // 是否使用单位
      disabled: false,
      controls: true,
      controlsPosition: '',
      customClass: '',
      labelWidth: 100,
      isLabelWidth: false,
      hidden: false,
      precision: 0
    },
    events: {
      onChange: '',
      onFocus: '',
      onBlur: ''
    },
    meta: generateMeta({
      column_format: 'DOUBLE', // 字段格式
      max_length: 50 // 最大长度,
    })
  },
  {
    type: 'radio',
    options: {
      inline: true,
      defaultValue: '',
      showLabel: false,
      optionStyle: 'border',
      options: [
        {value: '选项 1', label: '选项 1'},
        {value: '选项 2', label: '选项 2'},
        {value: '选项 3', label: '选项 3'}
      ],
      required: false,
      requiredMessage: '',
      validatorCheck: false,
      validator: '',
      isWidgetWidth: false,
      width: 100,
      remote: DATASOURCE_TYPE.STATIC_DATA,
      remoteOption: {
        remoteDict: generateSelectionDict()
      },
      remoteFunc: '',
      remoteOptionSource: '',
      remoteOptions: [],
      props: {
        value: 'value',
        label: 'label'
      },
      customClass: '',
      labelWidth: 100,
      isLabelWidth: false,
      hidden: false,
      disabled: false
    },
    events: {
      onChange: ''
    },
    meta: generateMeta({
      column_format: 'TEXT', // 字段格式
      max_length: 256 // 最大长度,
    })
  },
  {
    type: 'checkbox',
    options: {
      inline: true,
      defaultValue: [],
      showLabel: false,
      optionStyle: 'border',
      options: [
        {value: '选项 1', label: '选项 1'},
        {value: '选项 2', label: '选项 2'},
        {value: '选项 3', label: '选项 3'}
      ],
      required: false,
      requiredMessage: '',
      validatorCheck: false,
      validator: '',
      isWidgetWidth: false,
      width: 100,
      remote: DATASOURCE_TYPE.STATIC_DATA,
      remoteOption: {
        remoteDict: generateSelectionDict()
      },
      remoteFunc: '',
      remoteOptionSource: '',
      remoteOptions: [],
      props: {
        value: 'value',
        label: 'label'
      },
      customClass: '',
      labelWidth: 100,
      isLabelWidth: false,
      hidden: false,
      disabled: false
    },
    events: {
      onChange: ''
    },
    meta: generateMeta({
      column_format: 'TEXT', // 字段格式
      max_length: 256 // 最大长度,
    })
  },
  {
    type: 'select',
    options: {
      defaultValue: [],
      multiple: false,
      disabled: false,
      clearable: false,
      placeholder: '请选择',
      required: false,
      requiredMessage: '',
      validatorCheck: false,
      validator: '',
      showLabel: false,
      isWidgetWidth: false,
      width: 100,
      options: [
        {value: '选项 1', label: '选项 1'},
        {value: '选项 2', label: '选项 2'},
        {value: '选项 3', label: '选项 3'}
      ],
      remote: DATASOURCE_TYPE.STATIC_DATA,
      remoteOption: {
        remoteDict: generateSelectionDict()
      },
      remoteFunc: '',
      remoteOptionSource: '',
      filterable: true,
      remoteOptions: [],
      props: {
        value: 'value',
        label: 'label'
      },
      customClass: '',
      labelWidth: 100,
      isLabelWidth: false,
      hidden: false
    },
    events: {
      onChange: '',
      onFocus: '',
      onBlur: ''
    },
    meta: generateMeta({
      column_format: 'TEXT', // 字段格式
      max_length: 256 // 最大长度,
    })
  },
  // {
  //   type: 'time',
  //   options: {
  //     defaultValue: '',
  //     readonly: false,
  //     disabled: false,
  //     editable: true,
  //     clearable: true,
  //     placeholder: '',
  //     startPlaceholder: '',
  //     endPlaceholder: '',
  //     isRange: false,
  //     arrowControl: true,
  //     required: false,
  //     requiredMessage: '',
  //     validatorCheck: false,
  //     validator: '',
  //     isWidgetWidth: false,
  //     width: 100,
  //     customClass: '',
  //     labelWidth: 100,
  //     isLabelWidth: false,
  //     hidden: false,
  //
  //   },
  //   events: {
  //     onChange: '',
  //     onFocus: '',
  //     onBlur: ''
  //   },
  //   meta:generateMeta({
  //     column_format: 'INT', // 字段格式
  //     max_length: 256 // 最大长度,
  //   })
  // },
  {
    type: 'date',
    options: {
      defaultValue: null,
      readonly: false,
      disabled: false,
      editable: true,
      clearable: true,
      placeholder: '请选择',
      startPlaceholder: '',
      endPlaceholder: '',
      type: 'date',
      required: false,
      requiredMessage: '',
      validatorCheck: false,
      validator: '',
      isWidgetWidth: false,
      width: 100,
      customClass: '',
      labelWidth: 100,
      isLabelWidth: false,
      hidden: false,
      format: 'yyyy-MM-dd',
      customFormat: '',
      useDynamicValue: false
    },
    events: {
      onChange: '',
      onFocus: '',
      onBlur: ''
    },
    meta: generateMeta({
      column_format: 'BIGINT', // 字段格式
      max_length: 256 // 最大长度,
    })
  },
  {
    type: 'rate',
    options: {
      defaultValue: 0,
      max: 5,
      clearable: false,
      disabled: false,
      allowHalf: false,
      required: false,
      requiredMessage: '',
      customClass: '',
      labelWidth: 100,
      isLabelWidth: false,
      hidden: false,
      showScore: false,
      suffix: '分'
    },
    events: {
      onChange: ''
    },
    meta: generateMeta({
      column_format: 'DOUBLE', // 字段格式
      max_length: 256 // 最大长度,
    })
  },
  {
    type: 'switches',
    options: {
      defaultValue: false,
      required: false,
      requiredMessage: '',
      validatorCheck: false,
      validator: '',
      disabled: false,
      customClass: '',
      labelWidth: 100,
      isLabelWidth: false,
      hidden: false,
      activeText: '是',
      inactiveText: '否'
    },
    events: {
      onChange: ''
    },
    meta: generateMeta({
      column_format: 'TINYINT', // 字段格式
      max_length: 1 // 最大长度,
    })
  },
  {
    type: 'slider',
    options: {
      defaultValue: 0,
      disabled: false,
      required: false,
      requiredMessage: '',
      validatorCheck: false,
      validator: '',
      min: 0,
      max: 100,
      step: 1,
      showInput: false,
      suffix: '',
      range: false,
      isWidgetWidth: false,
      width: 100,
      customClass: '',
      labelWidth: 100,
      isLabelWidth: false,
      hidden: false
    },
    events: {
      onChange: ''
    },
    meta: generateMeta({
      column_format: 'DOUBLE', // 字段格式
      max_length: 256 // 最大长度,
    })
  },
  {
    type: 'button',
    options: {
      customClass: '',
      disabled: false,
      labelWidth: 100,
      hideLabel: true,
      hidden: false,
      buttonSize: 'small',
      buttonType: '',
      buttonPlain: false,
      buttonRound: false,
      buttonCircle: false,
      buttonName: '按钮',
      contentPosition: 'left',
      customWidth: false,
      width: 100
    },
    events: {
      onClick: ''
    },
    meta: false
  },
  {
    type: 'link',
    options: {
      customClass: '',
      contentPosition: 'left',
      disabled: false,
      labelWidth: 100,
      isLabelWidth: false,
      hideLabel: false,
      hidden: false,
      linkType: 'default',
      text: '文字链接',
      underline: true,
      blank: true,
      href: ''
    },
    events: {
      onClick: ''
    },
    meta: false
  },
  {
    type: 'upload',
    options: {
      customClass: '',
      disabled: false,
      labelWidth: 100,
      isLabelWidth: false,
      hideLabel: false,
      hidden: false,
      multiple: true,
      limit: 6,
      size: 20,
      tip: '',
      required: false,
      requiredMessage: ''
    },
    meta: generateMeta({
      column_format: 'TEXT', // 字段格式
      max_length: 2048 // 最大长度,
    })
  },
  {
    type: 'imageUpload',
    options: {
      customClass: '',
      disabled: false,
      labelWidth: 100,
      isLabelWidth: false,
      hideLabel: false,
      hidden: false,
      multiple: true,
      limit: 3,
      size: 2,
      tip: '',
      required: false,
      requiredMessage: ''
    },
    meta: generateMeta({
      column_format: 'TEXT', // 字段格式
      max_length: 2048 // 最大长度,
    })
  },
  {
    type: 'address',
    options: {
      customClass: '',
      labelWidth: 100,
      isLabelWidth: false,
      hideLabel: false,
      hidden: false,
      disabled: false,
      isAddressDetail: true,
      defaultValue: {
        postAddress: [],
        province: '',
        city: '',
        district: '',
        details: ''
      },
      required: false,
      requiredMessage: ''
    },
    meta: generateMeta({
      column_format: 'TEXT', // 字段格式
      max_length: 2048 // 最大长度,
    })
  }
];
export const advanceComponents = [
  {
    type: 'table',
    options: {
      defaultValue: [],
      customClass: '',
      labelWidth: 100,
      isLabelWidth: false,
      hidden: false,
      disabled: false,
      required: false,
      validatorCheck: false,
      validator: '',
      displayMode: 'table',
      paging: false,
      pageSize: 5,
      maxLimit: false,
      maxRows: 1000,
      hideLabel: false,
      dataImport: false
    },
    events: {
      onChange: '',
      // onBeforeRowAdd: '',
      onRowAdd: '',
      // onBeforeRowRemove: '',
      onRowRemove: '',
      onRowChange: ''
    },
    tableColumns: [],
    meta: false
  },
  {
    type: 'relatedForm',
    options: {
      defaultValue: '',
      disabled: false,
      clearable: false,
      placeholder: '请选择',
      required: false,
      requiredMessage: '',
      showLabel: false,
      filterable: true,
      customClass: '',
      labelWidth: 100,
      isLabelWidth: false,
      hidden: false,
      // 关联表单专属属性
      relatedFormInfo: {
        // 关联表单的应用id
        applicationId: '',
        // 关联表单的id
        formId: '',
        // 关联表单的名称
        formName: '',
        // 关联字段的model值
        targetColumn: '',
        // 数据过滤条件
        dataFilters: [],
        // 数据填充规则
        dataFillRules: [],
        // 关联表单的展示字段配置
        showColumns: []
      },
      // 本组件选项映射
      selectedMap: {
        label: '',
        value: ''
      }
    },
    meta: generateMeta()
  },
  {
    type: 'organization',
    options: {
      isWidgetWidth: false,
      width: 100,
      required: false,
      requiredMessage: '',
      placeholder: '请选择',
      customClass: '',
      disabled: false,
      labelWidth: 100,
      isLabelWidth: false,
      hidden: false,
      multiple: false,
      isInitNode: false, // 是否自定义根节点 : true = 是
      initNode: [], // 根节点 : 使用 array 获取, 解析时只取 index= 0,
      optionScopeType: 'ORGAN' // 可选范围 Array(String) : 'ORGAN' = 组织机构, 'PERSON' = 人员, 'ROLE' = 角色
    },
    events: {
      onChange: ''
    },
    meta: generateMeta({
      column_format: 'TEXT', // 字段格式
      max_length: 2048 // 最大长度,
    })
  },
  {
    type: 'member',
    options: {
      isWidgetWidth: false,
      width: 100,
      required: false,
      requiredMessage: '',
      placeholder: '请选择',
      customClass: '',
      disabled: false,
      labelWidth: 100,
      isLabelWidth: false,
      hidden: false,
      multiple: false,
      isInitNode: false, // 是否自定义根节点 : true = 是
      initNode: [], // 根节点 : 使用 array 获取, 解析时只取 index= 0,
      optionScopeType: 'PERSON' // 可选范围 Array(String) : 'ORGAN' = 组织机构, 'PERSON' = 人员, 'ROLE' = 角色
    },
    events: {
      onChange: ''
    },
    meta: generateMeta({
      column_format: 'TEXT', // 字段格式
      max_length: 2048 // 最大长度,
    })
  },
  {
    type: 'cascader',
    options: {
      defaultValue: [],
      isWidgetWidth: false,
      width: 100,
      placeholder: '请选择',
      disabled: false,
      clearable: false,
      options: [
        {
          value: '公司A',
          label: '公司A',
          children: [
            {value: '部门A', label: '部门A'},
            {value: '部门B', label: '部门B'}
          ]
        },
        {
          value: '公司B',
          label: '公司B',
          children: [
            {value: '部门A', label: '部门A'},
            {value: '部门B', label: '部门B'}
          ]
        }, {
          value: '公司C',
          label: '公司C'
        }
      ],
      remote: DATASOURCE_TYPE.STATIC_DATA,
      remoteOption: {
        remoteDict: generateSelectionDict()
      },
      remoteFunc: '',
      remoteOptionSource: '',
      remoteOptions: [],
      props: {
        value: 'value',
        label: 'label',
        children: 'children'
      },
      customClass: '',
      labelWidth: 100,
      isLabelWidth: false,
      hidden: false,
      required: false,
      validatorCheck: false,
      validator: '',
      multiple: false,
      filterable: true,
      checkStrictly: false
    },
    events: {
      onChange: '',
      onFocus: '',
      onBlur: ''
    },
    meta: generateMeta({
      column_format: 'TEXT', // 字段格式
      max_length: 1024 // 最大长度,
    })
  },
  {
    type: 'editor',
    options: {
      isWidgetWidth: false,
      width: 100,
      customClass: '',
      labelWidth: 100,
      isLabelWidth: false,
      hidden: false,
      disabled: false,
      required: false,
      validatorCheck: false,
      validator: ''
    },
    events: {
      onChange: ''
    },
    meta: generateMeta({
      column_format: 'LONGTEXT', // 字段格式
      max_length: 4096 // 最大长度,
    })
  },
  {
    type: 'uuid',
    options: {
      customClass: '',
      labelWidth: 100,
      isLabelWidth: false,
      hideLabel: false,
      hidden: false,
      defaultValue: '',
      required: true,
      requiredMessage: ''
    },
    meta: generateMeta({
      column_format: 'VARCHAR', // 字段格式
      max_length: 128 // 最大长度,
    })
  },
  {
    type: 'sequence',
    options: {
      customClass: '',
      labelWidth: 100,
      isLabelWidth: false,
      hideLabel: false,
      hidden: false,
      defaultValue: '',
      required: false,
      requiredMessage: '',
      previewValue: '',
      valueConfigList: [
        _.cloneDeep(sequenceItemStrMap.AUTO_INCREMENT)
      ]
    },
    meta: generateMeta({
      column_format: 'VARCHAR', // 字段格式
      max_length: 128 // 最大长度,
    })
  },
  {
    type: 'iframe',
    options: {
      customClass: '',
      hidden: false,
      width: '100',
      height: '300',
      href: ''
    },
    meta: false
  },
  {
    type: 'image',
    options: {
      customClass: '',
      hidden: false,
      width: '100',
      height: '300',
      fit: 'fill',
      src: ''
    },
    meta: false
  },
  {
    type: 'qrCode',
    options: {
      customClass: '',
      hidden: false,
      codeSize: 150,
      codeHeight: 50,
      displayCodeValue: false,
      relatedField: '',
      mode: 'qr',
      codeValue: 'CODE00000000000',
      qrCodeValueMode: 'static'
    }
  }
];
export const layoutComponents = [
  {
    type: 'grid',
    columns: [
      {
        type: 'col',
        options: {
          customClass: ''
        },
        list: []
      },
      {
        type: 'col',
        options: {
          customClass: ''
        },
        list: []
      }
    ],
    options: {
      cols: 2,
      justify: 'start',
      align: 'top',
      customClass: '',
      hidden: false,
      responsive: true
    },
    meta: false
  },
  {
    type: 'report',
    options: {
      customClass: '',
      hidden: false,
      borderWidth: 1,
      borderColor: '#dedede',
      width: '100%'
    },
    rows: [
      {
        columns: [
          {
            type: 'td',
            options: {
              colspan: 1,
              rowspan: 1,
              height: ''
            },
            list: []
          },
          {
            type: 'td',
            options: {
              colspan: 1,
              rowspan: 1,
              height: ''
            },
            list: []
          },
          {
            type: 'td',
            options: {
              colspan: 1,
              rowspan: 1,
              height: ''
            },
            list: []
          }
        ]
      }
    ],
    meta: false
  },
  {
    type: 'tabs',
    tabs: [
      {
        label: '标签页1',
        name: 'tab_1',
        list: []
      }
    ],
    options: {
      type: 'border-card',
      tabPosition: 'top',
      customClass: '',
      hidden: false
    }
  },
  {
    type: 'card',
    list: [],
    options: {
      showHeader: true,
      hidden: false,
      shadow: 'always'
    },
    meta: false
  },
  {
    type: 'collapse',
    collapse: [
      {
        label: '折叠面板1',
        name: 'collapse_1',
        list: []
      }
    ],
    options: {
      hidden: false,
      accordion: false
    },
    meta: false
  }
];
export const businessComponents = [
  {
    businessName: 'personName',
    type: 'input',
    options: {
      isWidgetWidth: false,
      width: 100,
      defaultValue: '',
      defaultVariable: '',
      isVariableDefaultValue: false,
      required: true,
      requiredMessage: '请输入姓名',
      dataType: '',
      dataTypeCheck: false,
      dataTypeMessage: '',
      pattern: '',
      patternCheck: false,
      patternFlags: [],
      patternMessage: '',
      validatorCheck: false,
      validator: '',
      placeholder: '请输入姓名',
      customClass: '',
      disabled: false,
      labelWidth: 100,
      isLabelWidth: false,
      hidden: false,
      showPassword: false
    },
    events: {
      onChange: '',
      onFocus: '',
      onBlur: ''
    },
    meta: generateMeta()
  },
  {
    businessName: 'personGender',
    type: 'radio',
    options: {
      inline: true,
      defaultValue: '',
      showLabel: false,
      optionStyle: 'border',
      options: [
        {value: '男', label: '男'},
        {value: '女', label: '女'}
      ],
      required: true,
      requiredMessage: '请选择性别',
      validatorCheck: false,
      validator: '',
      isWidgetWidth: false,
      width: 100,
      remote: DATASOURCE_TYPE.STATIC_DATA,
      remoteOption: {
        remoteDict: generateSelectionDict()
      },
      remoteFunc: '',
      remoteOptionSource: '',
      remoteOptions: [],
      props: {
        value: 'value',
        label: 'label'
      },
      customClass: '',
      labelWidth: 100,
      isLabelWidth: false,
      hidden: false,
      disabled: false
    },
    events: {
      onChange: ''
    },
    meta: generateMeta({
      column_format: 'TEXT', // 字段格式
      max_length: 256 // 最大长度,
    })
  },
  {
    businessName: 'idCard',
    type: 'input',
    options: {
      isWidgetWidth: false,
      width: 100,
      defaultValue: '',
      defaultVariable: '',
      isVariableDefaultValue: false,
      required: true,
      requiredMessage: '请输入身份证号码',
      dataType: 'IDNumber',
      dataTypeCheck: true,
      dataTypeShow: 'false',
      dataTypeMessage: '身份证号码格式不正确',
      pattern: '',
      patternCheck: false,
      patternFlags: [],
      patternMessage: '',
      validatorCheck: false,
      validator: '',
      placeholder: '请输入身份证号码',
      customClass: '',
      disabled: false,
      labelWidth: 100,
      isLabelWidth: false,
      hidden: false,
      showPassword: false
    },
    events: {
      onChange: '',
      onFocus: '',
      onBlur: ''
    },
    meta: generateMeta()
  },
  {
    businessName: 'unifiedSocialCreditCode',
    type: 'input',
    options: {
      isWidgetWidth: false,
      width: 100,
      defaultValue: '',
      defaultVariable: '',
      isVariableDefaultValue: false,
      required: true,
      requiredMessage: '请输入统一社会信用代码',
      dataType: 'unifiedSocialCreditCode',
      dataTypeCheck: true,
      dataTypeShow: 'false',
      dataTypeMessage: '统一社会信用代码格式不正确',
      pattern: '',
      patternCheck: false,
      patternFlags: [],
      patternMessage: '',
      validatorCheck: false,
      validator: '',
      placeholder: '请输入统一社会信用代码',
      customClass: '',
      disabled: false,
      labelWidth: 140,
      isLabelWidth: true,
      hidden: false,
      showPassword: false
    },
    events: {
      onChange: '',
      onFocus: '',
      onBlur: ''
    },
    meta: generateMeta()
  },
  {
    businessName: 'cellPhoneNumber',
    type: 'input',
    options: {
      isWidgetWidth: false,
      width: 100,
      defaultValue: '',
      defaultVariable: '',
      isVariableDefaultValue: false,
      required: true,
      requiredMessage: '请输入手机号码',
      dataType: 'mobile',
      dataTypeCheck: true,
      dataTypeShow: 'false',
      dataTypeMessage: '手机号码格式不正确',
      pattern: '',
      patternCheck: false,
      patternFlags: [],
      patternMessage: '',
      validatorCheck: false,
      validator: '',
      placeholder: '请输入手机号码',
      customClass: '',
      disabled: false,
      labelWidth: 100,
      isLabelWidth: false,
      hidden: false,
      showPassword: false
    },
    events: {
      onChange: '',
      onFocus: '',
      onBlur: ''
    },
    meta: generateMeta()
  },
  {
    businessName: 'telephoneNumber',
    type: 'input',
    options: {
      isWidgetWidth: false,
      width: 100,
      defaultValue: '',
      defaultVariable: '',
      isVariableDefaultValue: false,
      required: true,
      requiredMessage: '请输入固定电话',
      dataType: 'phone',
      dataTypeCheck: true,
      dataTypeShow: 'false',
      dataTypeMessage: '固定电话格式不正确',
      pattern: '',
      patternCheck: false,
      patternFlags: [],
      patternMessage: '',
      validatorCheck: false,
      validator: '',
      placeholder: '请输入固定电话',
      customClass: '',
      disabled: false,
      labelWidth: 100,
      isLabelWidth: false,
      hidden: false,
      showPassword: false
    },
    events: {
      onChange: '',
      onFocus: '',
      onBlur: ''
    },
    meta: generateMeta()
  },
  {
    businessName: 'email',
    type: 'input',
    options: {
      isWidgetWidth: false,
      width: 100,
      defaultValue: '',
      defaultVariable: '',
      isVariableDefaultValue: false,
      required: true,
      requiredMessage: '请输入电子邮箱',
      dataType: 'email',
      dataTypeCheck: true,
      dataTypeShow: 'false',
      dataTypeMessage: '电子邮箱格式不正确',
      pattern: '',
      patternCheck: false,
      patternFlags: [],
      patternMessage: '',
      validatorCheck: false,
      validator: '',
      placeholder: '请输入电子邮箱',
      customClass: '',
      disabled: false,
      labelWidth: 100,
      isLabelWidth: false,
      hidden: false,
      showPassword: false
    },
    events: {
      onChange: '',
      onFocus: '',
      onBlur: ''
    },
    meta: generateMeta()
  },
  {
    businessName: 'zipCode',
    type: 'input',
    options: {
      isWidgetWidth: false,
      width: 100,
      defaultValue: '',
      defaultVariable: '',
      isVariableDefaultValue: false,
      required: true,
      requiredMessage: '请输入邮政编码',
      dataType: 'mailCode',
      dataTypeCheck: true,
      dataTypeShow: 'false',
      dataTypeMessage: '邮政编码格式不正确',
      pattern: '',
      patternCheck: false,
      patternFlags: [],
      patternMessage: '',
      validatorCheck: false,
      validator: '',
      placeholder: '请输入邮政编码',
      customClass: '',
      disabled: false,
      labelWidth: 100,
      isLabelWidth: false,
      hidden: false,
      showPassword: false
    },
    events: {
      onChange: '',
      onFocus: '',
      onBlur: ''
    },
    meta: generateMeta()
  },
  {
    businessName: 'administrativeDivision',
    type: 'address',
    options: {
      customClass: '',
      labelWidth: 100,
      isLabelWidth: false,
      hideLabel: false,
      hidden: false,
      disabled: false,
      isAddressDetail: false,
      defaultValue: {
        postAddress: [],
        province: '',
        city: '',
        district: '',
        details: ''
      },
      required: true,
      requiredMessage: '请选择行政区划'
    },
    meta: generateMeta({
      column_format: 'TEXT', // 字段格式
      max_length: 2048 // 最大长度,
    })
  },
  {
    businessName: 'remark',
    type: 'input',
    options: {
      isWidgetWidth: false,
      width: 100,
      defaultValue: '',
      defaultVariable: '',
      isVariableDefaultValue: false,
      required: false,
      requiredMessage: '',
      dataType: '',
      dataTypeCheck: false,
      dataTypeMessage: '',
      pattern: '',
      patternCheck: false,
      patternFlags: [],
      patternMessage: '',
      validatorCheck: false,
      validator: '',
      placeholder: '请输入备注',
      customClass: '',
      disabled: false,
      labelWidth: 100,
      isLabelWidth: false,
      hidden: false,
      showPassword: false
    },
    events: {
      onChange: '',
      onFocus: '',
      onBlur: ''
    },
    meta: generateMeta()
  },
  {
    businessName: 'funds',
    type: 'number',
    options: {
      isWidgetWidth: false,
      width: 100,
      required: false,
      requiredMessage: '',
      validatorCheck: false,
      validator: '',
      defaultValue: 0,
      min: 0,
      max: 9999999,
      step: 1,
      suffix: '万元', // 单位值
      showSuffix: true, // 是否使用单位
      disabled: false,
      controls: true,
      controlsPosition: '',
      customClass: '',
      labelWidth: 100,
      isLabelWidth: false,
      hidden: false,
      precision: 0
    },
    events: {
      onChange: '',
      onFocus: '',
      onBlur: ''
    },
    meta: generateMeta({
      column_format: 'DOUBLE', // 字段格式
      max_length: 50 // 最大长度,
    })
  },
  {
    businessName: 'carNumber',
    type: 'input',
    options: {
      isWidgetWidth: false,
      width: 100,
      defaultValue: '',
      defaultVariable: '',
      isVariableDefaultValue: false,
      required: true,
      requiredMessage: '请输入车牌号',
      dataType: 'carNumber',
      dataTypeCheck: true,
      dataTypeShow: 'false',
      dataTypeMessage: '车牌号格式不正确',
      pattern: '',
      patternCheck: false,
      patternFlags: [],
      patternMessage: '',
      validatorCheck: false,
      validator: '',
      placeholder: '请输入车牌号',
      customClass: '',
      disabled: false,
      labelWidth: 100,
      isLabelWidth: false,
      hidden: false,
      showPassword: false
    },
    events: {
      onChange: '',
      onFocus: '',
      onBlur: ''
    },
    meta: generateMeta()
  }
];
